﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.Member.User.Active_step2" %>
<div class="common">
<div class="topmenu_op">
		<div style="text-align:left; margin:10px 0px 10px 0px">
			<div style="float:left; width:208px"><a href="/"><img src="/Images/newLogow.gif" border="0" /></a></div>
			<div style="float:right; width:550px; text-align:right"></div>
			<div class="clear"></div>
		</div>
	</div>
	<div class="topmenu_text">

		<div class="topmenu_text_site">
			<ul id="nav_manu">
				<li class="menu_left"><a href="/">Home</a> | Upload your photo</li>
				<li class="menu_right">Step 2 of 4</li>
			</ul>
			<div class="clear"></div>
		</div>

	</div>
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
			<!--content strat-->
				<div id="MessagesBox" class="DisplayNone" style="display:none">
                    <div class="MessagePanel4">
                        <img id="MessageImg" src="/images/ico_info.gif" style="border-width: 0px;" alt=""/>
                        <div id="MessageText"></div>
                    </div>
                </div>
		        <div class="Title">
					<div class="H1"><%=GetText("M0003")%></div><a href="<%=WWWHost %>/user/ActiveComplete.htm?setp=2">Skip ></a>
					<div class="grey12">Your photo is what we use to represent you when you're in italki. Note that profiles with photos will have a higher ranking when other language partners or teachers search for you. Individual headshots work best.</div>
	            </div>
				<div class="Center9001n">
					<div class="Center9001Common">
						<div class="Center9001Content">
						<%if(InitImg==""){ %>
							<div class="setting_area">
								<h3><%=GetText("ST034")%></h3>
								<div>
									<table id="table1" cellpadding="0" width="870" cellspacing="0" border="0" >
										<tr>
											<td>
											<%=GetText("ST035")%>
											
											<div style="float:left; width:100%; margin:20px 0px 0px 0px">
												<div style="background-color:#FDFAE1; padding:10px; ">
													<strong><%=GetText("ST038")%></strong>
													<p><%=GetText("ST039")%><span id="msg"></span><br />
													<iframe name='hidden_frame' id="hidden_frame" height="1" width="1" frameborder="0" style="display:none;"></iframe></p>
													<p><input type="file" id="file" name="file" class="common300"/><br /><%=GetText("ST040")%></p>
												</div>
												<p><input type="button" id="btnUpload" class="button" value="<%=GetText("C0059") %>" onclick="javascript:var obj = document.getElementById('cropForm');obj.action='/my/Profile/dophoto.htm?Flag=1';obj.submit();" /></p>
											</div>
											<div class="clear"></div>
											</td>
										</tr>
									</table>
									<table id="table2" style="display:none" width="870" cellspacing="0" border="0">
										<tr>
											<td width="65%"><div class="black16b"><strong><%=GetText("ST041")%></strong></div></td>
											<td width="35%"></td>
										</tr>
										<tr>
											<td valign="top">
											<div id="photo_upload">
												<div id="divCropImageBorder">
													<div id="cropImageContainer"> <img id="cropImage" src="" /> </div>
												</div>
											</div>
											</td>
											<td valign="top" style="padding-left:15px">
												<p class="black18"><%=GetText("ST042")%></p>
												<div style="background-color:#FDFAE1; padding:10px">
													<div id="iconPreview150"><img src="" id="load" name="previewpic"></div><div class="clear"></div>
													<p><%=GetText("ST043")%></p>
													<p><input type="button" value="<%=GetText("ST045")%>" name="select" onclick="Cropper.reset()" class="buttong" /> <input type="button" value="<%=GetText("ST046")%>" onclick="SelectFile()" class="buttong" /></p>
												</div>
												<p><input type="button" id="save" class="button" value="<%=GetText("ST044") %>" onclick="javascript:var obj = document.getElementById('cropForm');obj.action='/my/Profile/dophoto.htm?Flag=2';obj.submit();" /></p>
											</td>
										</tr>            
										<tr>
										  <td style="height: 74px"></td>
											<td style="height: 74px">
												<input type="hidden" name="imageW" id="imageW" onchange="Cropper.formResetImgW();" />
												<input type="hidden" name="imageH" id="imageH" onchange="Cropper.formResetImgH();" />
												<input type="hidden" name="cropX" id="cropX" value="0" onchange="Cropper.formSetX(this.value);" />
												<input type="hidden" name="cropY" id="cropY" value="0" onchange="Cropper.formSetY(this.value);" />
												<input type="hidden" name="cropW" id="cropW" value="0" onchange="Cropper.formSetW(this.value);" />
												<input type="hidden" name="cropH" id="cropH" value="0" onchange="Cropper.formSetH(this.value);" /></td>
										</tr>
									</table>
								</div>
							</div>
							<%}else{ %>
							<div align="center" > <p><img src="<%=InitImg %>" /></p><p><a href="<%=WWWHost %>/user/ActiveComplete.htm?setp=2"> Next </a></p></div>
							<%} %>
							
						</div>
					</div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<script>
function SetPageSate(flag,val)
{
    document.getElementById("MessagesBox").style.display = "block";
    switch(flag)
    {
        case "1"://上传
            if(val=="")
            {document.getElementById("MessagesBox").style.display = "none";
//                document.getElementById("hlkDelete").style.display = "none";
//                document.getElementById("MessageText").innerHTML = "<%=msg1[3] %>";
            }        
            else if(val=="f")
            {
                document.getElementById("MessageText").innerHTML = "<%=msg1[4] %>";
            }
            else
            {
                document.getElementById("MessageText").innerHTML = "<%=GetText("ST040") %>";         
            }
            break;
        case "2"://保存
            if(val=="")
            {
                document.getElementById("timgPhoto").style.display = "block"
                document.getElementById("MessageText").innerHTML = "<%=msg1[0] %>";
            }
            else
            {
                document.getElementById("MessageText").innerHTML = "<%=msg1[4] %>";
            }
            break;
        case "3"://删除
            if(val=="")
            {
                document.getElementById("imgPhoto").src = "/images/no_pic.gif";
                document.getElementById("MessageText").innerHTML = "<%=msg1[1] %>";//成功
            }
            else
            {
                document.getElementById("MessageText").innerHTML = "<%=msg1[4] %>";
            }
            break;        
    }    
}
</script>
